package me.zhengjie.inter.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.business.domain.Order;
import me.zhengjie.business.domain.OrderMx;
import me.zhengjie.business.service.OrderMxService;
import me.zhengjie.business.service.OrderService;
import me.zhengjie.business.service.dto.OrderDto;
import me.zhengjie.business.service.dto.OrderMxDto;
import me.zhengjie.business.service.dto.OrderMxQueryCriteria;
import me.zhengjie.business.service.dto.OrderQueryCriteria;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author xiahongbo
 * @date 2022-07-10
 **/
@RestController
@RequiredArgsConstructor
@Api(tags = "移动端订单")
@RequestMapping("/mp/orderMx")
public class MpOrderMxController {

    private final OrderMxService orderMxService;


    @GetMapping(value = "/orderMxList")
    @ApiOperation("订单列表-执行人员")
    public ResponseEntity<Object> orderMxList(OrderMxQueryCriteria criteria) {
        List<OrderMxDto> page = orderMxService.queryAll(criteria);
        return new ResponseEntity<>(PageUtil.toMpContent(page), HttpStatus.OK);
    }

}
